﻿package game.objects {
	
	import flash.display.MovieClip;
	import game.objects.num.Num;
	
	
	public class OverBackground extends MovieClip {
		
		
		public function OverBackground(gameOver:Boolean, endScore:Number) {
			stop();
			this.x = 512;
			this.y = 384;
			trace("gameovervalue: "+ gameOver)
			if (gameOver)
			{
				this.gotoAndStop("gameover");
			}
			else if (endScore >= 65000)
			{
				this.gotoAndStop("great");
			}
			else if (endScore >= 55000 && endScore < 65000)
			{
				this.gotoAndStop("good");
			}
			else if (endScore >= 35000 && endScore < 55000)
			{
				this.gotoAndStop("ok");
			}
			else if (endScore >= 0 && endScore < 35000)
			{
				this.gotoAndStop("bad");
			}
		}
	}
	
}
